﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="regUpdateImg.ascx.cs" Inherits="ZF.WS.UserControls.regUpdateImg" %>

<style>
.regulimg li { width:100px; float:left; text-align:center;}
.regulimg li div img{  width:100px; height:50px; border:1px soild #eee; margin-bottom:5px;}
</style>
<tr>
    <td class="ll">
        <div class="c">
            <span class="xh_"></span>证件上传：
        </div>
    </td>
    <td class="lr" colspan="3">
        <div class="c">
            <div class="regulimg">
                <ul>
                    <li  class="idcardimg"> 
                        <div><img src="/photo/member/<%=this.tbIDCardImg.Text %>" />
                        </div>
                        <a href="javascript:" class="linkbtn">身份证</a> </li>
                    <li  class="busimg">
                        <div><img src="/photo/member/<%=this.tbBusImg.Text %>" />
                        </div>
                        <a href="javascript:" class="linkbtn">名片</a> </li>
                    <li  class="licimg">
                        <div><img src="/photo/member/<%=this.tbLicImg.Text %>" />
                        </div>
                        <a href="javascript:" class="linkbtn">执业证</a> </li>
                </ul>
                <zf:TextBox runat="server" ID="tbIDCardImg" class=" dn_  idcardimg"></zf:TextBox>
                <zf:TextBox runat="server" ID="tbBusImg" class=" dn_  busimg"></zf:TextBox>
                <zf:TextBox runat="server" ID="tbLicImg" class="  dn_ licimg"></zf:TextBox>
            </div>
        </div>
    </td>
</tr>

<script>
    $(function() {
        $(".regulimg li a").click(function() {
            opuploadimgfrm($(this.parentNode).attr("class"));
        });
    });
    function _regUploadImgOk(type, img) {
        $(String.format(".regulimg li.{0} div", type)).html(String.format("<img src='/photo/member/{0}' />", img));
        $(String.format("input.{0}", type)).val(img);
    }
</script>
<script>
    function opuploadimgfrm(type) {
        var sWidth = 400;
        var sHeight = 180;
        var l = (screen.availWidth - sWidth) / 2;
        var t = (screen.availHeight - sHeight) / 2 + 20;
        var open_flag = window.open("", "newwindow", String.format("left={0},top={1},height={2}, width={3},toolbar=no,menubar=no,status=yes,location=no,scrollbars=no,resizable=no",
             l, t, sHeight, sWidth));
        open_flag.location.href = "/reg/reguploadimg.aspx?type=" + type;
        open_flag.focus();
        open_flag.window.onload = function() {
            alert("ok");
        };
    }
</script>

